<?php
namespace BP\GPM;
require_once("BP/En/Map.php");
class PerSetting extends EntityMyPK {
	public function getFK_App () 
	{
		return $this->GetValStringByKey(PerSettingAttr::$FK_App);
	}
	public function setFK_App ($value) // [String value]
	{
		$this->SetValByKey(PerSettingAttr::$FK_App, $value);
	}
	public function getFK_Emp () 
	{
		return $this->GetValStringByKey(PerSettingAttr::$FK_Emp);
	}
	public function setFK_Emp ($value) // [String value]
	{
		$this->SetValByKey(PerSettingAttr::$FK_Emp, $value);
	}
	public function getUserNo () 
	{
		return $this->GetValStringByKey(PerSettingAttr::$UserNo);
	}
	public function setUserNo ($value) // [String value]
	{
		$this->SetValByKey(PerSettingAttr::$UserNo, $value);
	}
	public function getUserPass () 
	{
		return $this->GetValStringByKey(PerSettingAttr::$UserPass);
	}
	public function setUserPass ($value) // [String value]
	{
		$this->SetValByKey(PerSettingAttr::$UserPass, $value);
	}
	public function getIdx () 
	{
		return $this->GetValIntByKey(PerSettingAttr::$Idx);
	}
	public function setIdx ($value) // [int value]
	{
		$this->SetValByKey(PerSettingAttr::$Idx, $value);
	}
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public static function constructor__String ($no) // [String no]
	{
		$me = new self();
		$me->setMyPK($no);
		$me->Retrieve();
		return $me;
	}
	public function getEnMap () 
	{
		if (($this->get_enMap() != NULL))
		{
			return $this->get_enMap();
		}
		$map = new Map("GPM_PerSetting");
		$map->setDepositaryOfEntity($Depositary->None);
		$map->setDepositaryOfMap($Depositary->Application);
		$map->setEnDesc("个人设置");
		$map->setEnType($EnType->Sys);
		$map->AddMyPK();
		$map->AddTBString(PerSettingAttr::$FK_Emp, NULL, "人员",  TRUE ,  FALSE , 0, 200, 20);
		$map->AddTBString(PerSettingAttr::$FK_App, NULL, "系统",  TRUE ,  FALSE , 0, 200, 20);
		$map->AddTBString(PerSettingAttr::$UserNo, NULL, "UserNo",  TRUE ,  FALSE , 0, 200, 20,  TRUE );
		$map->AddTBString(PerSettingAttr::$UserPass, NULL, "UserPass",  TRUE ,  FALSE , 0, 200, 20,  TRUE );
		$map->AddTBInt(PerSettingAttr::$Idx, 0, "显示顺序",  FALSE ,  TRUE );
		$this->set_enMap($map);
		return $this->get_enMap();
	}
	protected function beforeUpdateInsertAction () 
	{
		$this->setMyPK((($this->getFK_Emp() . "_") . $this->getFK_App()));
		return parent->beforeUpdateInsertAction();
	}
}
?>
